package com.yungu.swift.schedule.job;


import com.alibaba.dubbo.config.annotation.Reference;
import com.yungu.swift.order.service.WxToBankService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.PersistJobDataAfterExecution;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

/**
 * @author Zerrion
 * @version 1.0
 * @description 查询微信转账到银行卡状态
 * @date 2019/1/4 20:57
 */
@Slf4j
@Component
@PersistJobDataAfterExecution
@DisallowConcurrentExecution// 不允许并发执行
public class QueryWxToBankJob extends QuartzJobBean {

    @Reference
    private WxToBankService wxToBankService;

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("---微信转账到银行卡开始（提现进度）---");
        wxToBankService.queryWxToBank();
        log.info("---微信转账到银行卡结束（提现进度）---");
    }
}
